<?php
defined('_JEXEC') or die('Restricted access');

/*
 * html5nav (nav and header tags)
 */
function modChrome_html5nav($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<nav<?php if(strlen($params->get('moduleclass_sfx'))) echo " class=\"{$params->get('moduleclass_sfx')}\"" ?>>
		<?php if ($module->showtitle != 0) : ?>
			<header><h1><?php echo $module->title; ?></h1></header>
		<?php endif; ?>
			<?php echo $module->content; ?>
		</nav>
	<?php endif;
}
/*
 * html5sect (section and header tags)
 */
function modChrome_html5sect($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<section<?php if(strlen($params->get('moduleclass_sfx'))) echo " class=\"{$params->get('moduleclass_sfx')}\"" ?>>
		<?php if ($module->showtitle != 0) : ?>
			<header><h1><?php echo $module->title; ?></h1></header>
		<?php endif; ?>
			<?php echo $module->content; ?>
		</section>
	<?php endif;
}
/*
 * html5art (article and header tags)
 */
function modChrome_html5art($module, &$params, &$attribs)
{
	if (!empty ($module->content)) : ?>
		<article<?php if(strlen($params->get('moduleclass_sfx'))) echo " class=\"{$params->get('moduleclass_sfx')}\"" ?>>
		<?php if ($module->showtitle != 0) : ?>
			<header><h1><?php echo $module->title; ?></h1></header>
		<?php endif; ?>
			<?php echo $module->content; ?>
		</article>
	<?php endif;
}
?>